import Vue from 'vue'
import App from './App.vue'
import router from './router'

Vue.config.productionTip = false

import './plugins/vant.js'

import './filters.js'

import BaiduMap from 'vue-baidu-map'

Vue.use(BaiduMap, {
  // ak 是在百度地图开发者平台申请的密钥 详见 http://lbsyun.baidu.com/apiconsole/key */
  ak: 'qT14GyA4C0UFHLc6hiI3jQLFRLqK072A'
})

import axios from 'axios'
axios.defaults.baseURL = 'http://www.liulongbin.top:3005'
Vue.prototype.$http = axios 

import VeeValidate, { Validator } from "vee-validate";
Vue.use(VeeValidate);

// 手机号码验证
Validator.extend("mobile", {
  getMessage: () => `请输入正确的手机号码`,
  validate: value =>
    value.length === 11 &&
    /^(((13[0-9]{1})|(14[57]{1})|(15[012356789]{1})|(17[03678]{1})|(18[0-9]{1})|(19[89]{1})|(16[6]{1}))+\d{8})$/.test(
      value
    )
});

import store from './store.js'

new Vue({
  store,
  router,
  render: h => h(App)
}).$mount('#app')
